package code;

import java.util.TreeMap;
import java.util.TreeSet;

public class Main_0407 {
    public static void main(String[] args) {
        TreeSet<Integer> integers = new TreeSet<Integer>((s1,s2)->{return s1-s2;});
        TreeSet<Integer> integers1 = new TreeSet<Integer>((s1,s2)->{return s1-s2;});
        integers.add(1);
        integers.add(3);
        integers.add(5);
        integers.add(7);
        integers.add(9);

        //大于4的最小值


        Integer ceiling = integers.ceiling(4);
        System.out.println(ceiling);
        //小于4的最大值
        System.out.println(integers.lower(5));
        System.out.println(integers.lower(5));
        System.out.println(integers.floor(5));
    }
}
